package mpcc.mpcc.activity.busi_presentation;

import java.util.ArrayList;

import mpcc.mpcc.activity.MPCCActivity;
import mpcc.mpcc.activity.R;
import android.app.Activity;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

public class BusinessNoteShowActivity extends Activity {
	private TextView title;

	private TextView businessNoteContent;

	private Button noteBtn;

	@Override
	protected void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);
		setContentView(R.layout.businesnoteshow);
		title = (TextView) findViewById(R.id.businessnoteTitle);

		businessNoteContent = (TextView) findViewById(R.id.businessnoteContent);

		noteBtn = (Button) findViewById(R.id.returnBusi_btn);
		
		Bundle bundle = this.getIntent().getExtras();
		ArrayList<String> businessidlist = (ArrayList<String>) bundle
				.getSerializable("businessnoteidlist");

		initalView(businessidlist.get(0));

	}

	public void initalView(String businessid) {
		String title = null, businessNoteContent = null;
		if (businessid.equals("1")) {
			title = "a";
			businessNoteContent = "cdasdas";
			
		}
		this.title.setText(title);

		this.businessNoteContent.setText(businessNoteContent);
		final String businessnoteid=businessid;
		noteBtn.setOnClickListener(new OnClickListener() {
				public void onClick(View v) {
					ArrayList<String> arrClass = new ArrayList<String>();
					arrClass.add(businessnoteid);
					Bundle bundle = new Bundle();
					bundle.putSerializable("businessidlist", arrClass);

					Intent intent = new Intent();
					intent.putExtras(bundle);
					intent.setClass(BusinessNoteShowActivity.this,
							BusinessShowActivity.class);
					startActivity(intent);
				}

			});

	}
}
